angular.module("report.service", [])
    .factory('report_Service',['$http',function($http){
        var service = {};

        //根据项目ID获取需求总数，以及显示最新的前13条未完成的需求信息
        service.jiraIssue = function () {
            return $http({
                method: 'GET',
                url:"/api/report/jiraBug"
            });
        };

        service.getCommitByProduct = function () {
            return $http({
                method: 'GET',
                url:"/api/report/commitByProduct"
            });
        };

        service.getCommitByProductPerson = function (data) {
            return $http({
                method: 'GET',
                url:"/api/report/commitByProductPerson",
                params:{"productKey":data.productKey}
            });
        };

        service.getTestrailByProduct = function () {
            return $http({
                method: 'GET',
                url:"/api/report/testrailByProduct"
            });
        };

        return service;
    }]);